import { defineStore } from 'pinia';
import { ref } from 'vue';

const useStore = defineStore('store', () => {
  const info = ref({
    mqtt_id: '',
    mqtt_ip: '',
    mqtt_state: false,
    mqtt_port: 0,
    server_ip: '',
    server_port: 0,
    color: '',
    msg: '',
  });

  const setInfo = (value) => {
    info.value = value;
  };

  return {
    info,
    setInfo,
  };
});

export default useStore;
